/*
 * Copyright (C) 2016  Nicola Spanti (RyDroid) <dev@nicola-spanti.info>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */


#ifndef PLANET_WARS_2D_RT_CORE_MODEL_GAME_STATE_SELECTION_H
#define PLANET_WARS_2D_RT_CORE_MODEL_GAME_STATE_SELECTION_H


#include "PlanetWars2dRT-core/specific/model/selection.h"


EXTERN_C_BEGIN


struct game_state_selection_t
{
  selection_2d_uint selection;
  position_2d_uint  position_to_move_ships;
  bool              use_selection_to_move_ships;
};

typedef struct game_state_selection_t game_state_selection_t;


void
game_state_selection_destructor(game_state_selection_t* a_state);

void
game_state_selection_init_first_time_only(game_state_selection_t* a_state);

void
game_state_selection_clear(game_state_selection_t* a_state);

void
game_state_selection_starts_rectangle(game_state_selection_t* a_state,
				      unsigned int x,
				      unsigned int y);

void
game_state_selection_moves_rectangle(game_state_selection_t* a_state,
				     unsigned int x,
				     unsigned int y);

void
game_state_selection_ends_rectangle(game_state_selection_t* a_state,
				    unsigned int x,
				    unsigned int y);

void
game_state_selection_move_ships(game_state_selection_t* a_state,
				unsigned int x,
				unsigned int y);


EXTERN_C_END


#endif
